package pack1;

import java.util.List;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class sprg12 {

public static void main(String[] args) {

	WebDriver driver=new FirefoxDriver();
	driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
	
	driver.get("file:///C:/Users/anand/Desktop/tst.html");
	
	WebElement listBox= driver.findElement(By.id("dl1"));
	Select select =new Select(listBox);
	List<WebElement> allOption = select.getOptions();
	System.out.println(allOption.size());
	for(int i=0;i<allOption.size();i++)
	{
	System.out.println(	allOption.get(i).getText()) ;
	}
	
}

}
